<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>原型和继承</title>
</head>
<body>
    

    <script>
    
        class Fn {
            constructor () {
                this.x = 100;
                this.y = 200;
                this.fn = function () {
                    console.log('Constructor Function'); 
                }
            }

            getX () {
                console.log(this.x);
            }

            getY () {
                console.log(this.y);
            }
        }

        let f = new Fn();

        f.getX();


    </script>
</body>
</html>